//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension KinesisAnalytics {
    // MARK: Enums

    public enum ApplicationStatus: String, CustomStringConvertible, Codable {
        case deleting = "DELETING"
        case ready = "READY"
        case running = "RUNNING"
        case starting = "STARTING"
        case stopping = "STOPPING"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum InputStartingPosition: String, CustomStringConvertible, Codable {
        case lastStoppedPoint = "LAST_STOPPED_POINT"
        case now = "NOW"
        case trimHorizon = "TRIM_HORIZON"
        public var description: String { return self.rawValue }
    }

    public enum RecordFormatType: String, CustomStringConvertible, Codable {
        case csv = "CSV"
        case json = "JSON"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AddApplicationCloudWatchLoggingOptionRequest: AWSEncodableShape {
        /// The Kinesis Analytics application name.
        public let applicationName: String
        /// Provides the CloudWatch log stream Amazon Resource Name (ARN) and the IAM role ARN. Note: To write application messages to CloudWatch, the IAM role that is used must have the PutLogEvents policy action enabled.
        public let cloudWatchLoggingOption: CloudWatchLoggingOption
        /// The version ID of the Kinesis Analytics application.
        public let currentApplicationVersionId: Int64

        public init(applicationName: String, cloudWatchLoggingOption: CloudWatchLoggingOption, currentApplicationVersionId: Int64) {
            self.applicationName = applicationName
            self.cloudWatchLoggingOption = cloudWatchLoggingOption
            self.currentApplicationVersionId = currentApplicationVersionId
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.cloudWatchLoggingOption.validate(name: "\(name).cloudWatchLoggingOption")
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, max: 999_999_999)
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "ApplicationName"
            case cloudWatchLoggingOption = "CloudWatchLoggingOption"
            case currentApplicationVersionId = "CurrentApplicationVersionId"
        }
    }

    public struct AddApplicationCloudWatchLoggingOptionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AddApplicationInputProcessingConfigurationRequest: AWSEncodableShape {
        /// Name of the application to which you want to add the input processing configuration.
        public let applicationName: String
        /// Version of the application to which you want to add the input processing configuration. You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned.
        public let currentApplicationVersionId: Int64
        /// The ID of the input configuration to add the input processing configuration to. You can get a list of the input IDs for an application using the DescribeApplication operation.
        public let inputId: String
        /// The InputProcessingConfiguration to add to the application.
        public let inputProcessingConfiguration: InputProcessingConfiguration

        public init(applicationName: String, currentApplicationVersionId: Int64, inputId: String, inputProcessingConfiguration: InputProcessingConfiguration) {
            self.applicationName = applicationName
            self.currentApplicationVersionId = currentApplicationVersionId
            self.inputId = inputId
            self.inputProcessingConfiguration = inputProcessingConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, max: 999_999_999)
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, min: 1)
            try self.validate(self.inputId, name: "inputId", parent: name, max: 50)
            try self.validate(self.inputId, name: "inputId", parent: name, min: 1)
            try self.validate(self.inputId, name: "inputId", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.inputProcessingConfiguration.validate(name: "\(name).inputProcessingConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "ApplicationName"
            case currentApplicationVersionId = "CurrentApplicationVersionId"
            case inputId = "InputId"
            case inputProcessingConfiguration = "InputProcessingConfiguration"
        }
    }

    public struct AddApplicationInputProcessingConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AddApplicationInputRequest: AWSEncodableShape {
        /// Name of your existing Amazon Kinesis Analytics application to which you want to add the streaming source.
        public let applicationName: String
        /// Current version of your Amazon Kinesis Analytics application. You can use the DescribeApplication operation to find the current application version.
        public let currentApplicationVersionId: Int64
        /// The Input to add.
        public let input: Input

        public init(applicationName: String, currentApplicationVersionId: Int64, input: Input) {
            self.applicationName = applicationName
            self.currentApplicationVersionId = currentApplicationVersionId
            self.input = input
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, max: 999_999_999)
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, min: 1)
            try self.input.validate(name: "\(name).input")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "ApplicationName"
            case currentApplicationVersionId = "CurrentApplicationVersionId"
            case input = "Input"
        }
    }

    public struct AddApplicationInputResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AddApplicationOutputRequest: AWSEncodableShape {
        /// Name of the application to which you want to add the output configuration.
        public let applicationName: String
        /// Version of the application to which you want to add the output configuration. You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned.
        public let currentApplicationVersionId: Int64
        /// An array of objects, each describing one output configuration. In the output configuration, you specify the name of an in-application stream, a destination (that is, an Amazon Kinesis stream, an Amazon Kinesis Firehose delivery stream, or an AWS Lambda function), and record the formation to use when writing to the destination.
        public let output: Output

        public init(applicationName: String, currentApplicationVersionId: Int64, output: Output) {
            self.applicationName = applicationName
            self.currentApplicationVersionId = currentApplicationVersionId
            self.output = output
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, max: 999_999_999)
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, min: 1)
            try self.output.validate(name: "\(name).output")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "ApplicationName"
            case currentApplicationVersionId = "CurrentApplicationVersionId"
            case output = "Output"
        }
    }

    public struct AddApplicationOutputResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AddApplicationReferenceDataSourceRequest: AWSEncodableShape {
        /// Name of an existing application.
        public let applicationName: String
        /// Version of the application for which you are adding the reference data source. You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned.
        public let currentApplicationVersionId: Int64
        /// The reference data source can be an object in your Amazon S3 bucket. Amazon Kinesis Analytics reads the object and copies the data into the in-application table that is created. You provide an S3 bucket, object key name, and the resulting in-application table that is created. You must also provide an IAM role with the necessary permissions that Amazon Kinesis Analytics can assume to read the object from your S3 bucket on your behalf.
        public let referenceDataSource: ReferenceDataSource

        public init(applicationName: String, currentApplicationVersionId: Int64, referenceDataSource: ReferenceDataSource) {
            self.applicationName = applicationName
            self.currentApplicationVersionId = currentApplicationVersionId
            self.referenceDataSource = referenceDataSource
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, max: 999_999_999)
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, min: 1)
            try self.referenceDataSource.validate(name: "\(name).referenceDataSource")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "ApplicationName"
            case currentApplicationVersionId = "CurrentApplicationVersionId"
            case referenceDataSource = "ReferenceDataSource"
        }
    }

    public struct AddApplicationReferenceDataSourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ApplicationDetail: AWSDecodableShape {
        /// ARN of the application.
        public let applicationARN: String
        /// Returns the application code that you provided to perform data analysis on any of the in-application streams in your application.
        public let applicationCode: String?
        /// Description of the application.
        public let applicationDescription: String?
        /// Name of the application.
        public let applicationName: String
        /// Status of the application.
        public let applicationStatus: ApplicationStatus
        /// Provides the current application version.
        public let applicationVersionId: Int64
        /// Describes the CloudWatch log streams that are configured to receive application messages. For more information about using CloudWatch log streams with Amazon Kinesis Analytics applications, see Working with Amazon CloudWatch Logs.
        public let cloudWatchLoggingOptionDescriptions: [CloudWatchLoggingOptionDescription]?
        /// Time stamp when the application version was created.
        public let createTimestamp: Date?
        /// Describes the application input configuration. For more information, see Configuring Application Input.
        public let inputDescriptions: [InputDescription]?
        /// Time stamp when the application was last updated.
        public let lastUpdateTimestamp: Date?
        /// Describes the application output configuration. For more information, see Configuring Application Output.
        public let outputDescriptions: [OutputDescription]?
        /// Describes reference data sources configured for the application. For more information, see Configuring Application Input.
        public let referenceDataSourceDescriptions: [ReferenceDataSourceDescription]?

        public init(applicationARN: String, applicationCode: String? = nil, applicationDescription: String? = nil, applicationName: String, applicationStatus: ApplicationStatus, applicationVersionId: Int64, cloudWatchLoggingOptionDescriptions: [CloudWatchLoggingOptionDescription]? = nil, createTimestamp: Date? = nil, inputDescriptions: [InputDescription]? = nil, lastUpdateTimestamp: Date? = nil, outputDescriptions: [OutputDescription]? = nil, referenceDataSourceDescriptions: [ReferenceDataSourceDescription]? = nil) {
            self.applicationARN = applicationARN
            self.applicationCode = applicationCode
            self.applicationDescription = applicationDescription
            self.applicationName = applicationName
            self.applicationStatus = applicationStatus
            self.applicationVersionId = applicationVersionId
            self.cloudWatchLoggingOptionDescriptions = cloudWatchLoggingOptionDescriptions
            self.createTimestamp = createTimestamp
            self.inputDescriptions = inputDescriptions
            self.lastUpdateTimestamp = lastUpdateTimestamp
            self.outputDescriptions = outputDescriptions
            self.referenceDataSourceDescriptions = referenceDataSourceDescriptions
        }

        private enum CodingKeys: String, CodingKey {
            case applicationARN = "ApplicationARN"
            case applicationCode = "ApplicationCode"
            case applicationDescription = "ApplicationDescription"
            case applicationName = "ApplicationName"
            case applicationStatus = "ApplicationStatus"
            case applicationVersionId = "ApplicationVersionId"
            case cloudWatchLoggingOptionDescriptions = "CloudWatchLoggingOptionDescriptions"
            case createTimestamp = "CreateTimestamp"
            case inputDescriptions = "InputDescriptions"
            case lastUpdateTimestamp = "LastUpdateTimestamp"
            case outputDescriptions = "OutputDescriptions"
            case referenceDataSourceDescriptions = "ReferenceDataSourceDescriptions"
        }
    }

    public struct ApplicationSummary: AWSDecodableShape {
        /// ARN of the application.
        public let applicationARN: String
        /// Name of the application.
        public let applicationName: String
        /// Status of the application.
        public let applicationStatus: ApplicationStatus

        public init(applicationARN: String, applicationName: String, applicationStatus: ApplicationStatus) {
            self.applicationARN = applicationARN
            self.applicationName = applicationName
            self.applicationStatus = applicationStatus
        }

        private enum CodingKeys: String, CodingKey {
            case applicationARN = "ApplicationARN"
            case applicationName = "ApplicationName"
            case applicationStatus = "ApplicationStatus"
        }
    }

    public struct ApplicationUpdate: AWSEncodableShape {
        /// Describes application code updates.
        public let applicationCodeUpdate: String?
        /// Describes application CloudWatch logging option updates.
        public let cloudWatchLoggingOptionUpdates: [CloudWatchLoggingOptionUpdate]?
        /// Describes application input configuration updates.
        public let inputUpdates: [InputUpdate]?
        /// Describes application output configuration updates.
        public let outputUpdates: [OutputUpdate]?
        /// Describes application reference data source updates.
        public let referenceDataSourceUpdates: [ReferenceDataSourceUpdate]?

        public init(applicationCodeUpdate: String? = nil, cloudWatchLoggingOptionUpdates: [CloudWatchLoggingOptionUpdate]? = nil, inputUpdates: [InputUpdate]? = nil, outputUpdates: [OutputUpdate]? = nil, referenceDataSourceUpdates: [ReferenceDataSourceUpdate]? = nil) {
            self.applicationCodeUpdate = applicationCodeUpdate
            self.cloudWatchLoggingOptionUpdates = cloudWatchLoggingOptionUpdates
            self.inputUpdates = inputUpdates
            self.outputUpdates = outputUpdates
            self.referenceDataSourceUpdates = referenceDataSourceUpdates
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationCodeUpdate, name: "applicationCodeUpdate", parent: name, max: 102_400)
            try self.validate(self.applicationCodeUpdate, name: "applicationCodeUpdate", parent: name, min: 0)
            try self.cloudWatchLoggingOptionUpdates?.forEach {
                try $0.validate(name: "\(name).cloudWatchLoggingOptionUpdates[]")
            }
            try self.inputUpdates?.forEach {
                try $0.validate(name: "\(name).inputUpdates[]")
            }
            try self.outputUpdates?.forEach {
                try $0.validate(name: "\(name).outputUpdates[]")
            }
            try self.referenceDataSourceUpdates?.forEach {
                try $0.validate(name: "\(name).referenceDataSourceUpdates[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case applicationCodeUpdate = "ApplicationCodeUpdate"
            case cloudWatchLoggingOptionUpdates = "CloudWatchLoggingOptionUpdates"
            case inputUpdates = "InputUpdates"
            case outputUpdates = "OutputUpdates"
            case referenceDataSourceUpdates = "ReferenceDataSourceUpdates"
        }
    }

    public struct CSVMappingParameters: AWSEncodableShape & AWSDecodableShape {
        /// Column delimiter. For example, in a CSV format, a comma (",") is the typical column delimiter.
        public let recordColumnDelimiter: String
        /// Row delimiter. For example, in a CSV format, '\n' is the typical row delimiter.
        public let recordRowDelimiter: String

        public init(recordColumnDelimiter: String, recordRowDelimiter: String) {
            self.recordColumnDelimiter = recordColumnDelimiter
            self.recordRowDelimiter = recordRowDelimiter
        }

        public func validate(name: String) throws {
            try self.validate(self.recordColumnDelimiter, name: "recordColumnDelimiter", parent: name, min: 1)
            try self.validate(self.recordRowDelimiter, name: "recordRowDelimiter", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case recordColumnDelimiter = "RecordColumnDelimiter"
            case recordRowDelimiter = "RecordRowDelimiter"
        }
    }

    public struct CloudWatchLoggingOption: AWSEncodableShape {
        /// ARN of the CloudWatch log to receive application messages.
        public let logStreamARN: String
        /// IAM ARN of the role to use to send application messages. Note: To write application messages to CloudWatch, the IAM role that is used must have the PutLogEvents policy action enabled.
        public let roleARN: String

        public init(logStreamARN: String, roleARN: String) {
            self.logStreamARN = logStreamARN
            self.roleARN = roleARN
        }

        public func validate(name: String) throws {
            try self.validate(self.logStreamARN, name: "logStreamARN", parent: name, max: 2048)
            try self.validate(self.logStreamARN, name: "logStreamARN", parent: name, min: 1)
            try self.validate(self.logStreamARN, name: "logStreamARN", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 2048)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case logStreamARN = "LogStreamARN"
            case roleARN = "RoleARN"
        }
    }

    public struct CloudWatchLoggingOptionDescription: AWSDecodableShape {
        /// ID of the CloudWatch logging option description.
        public let cloudWatchLoggingOptionId: String?
        /// ARN of the CloudWatch log to receive application messages.
        public let logStreamARN: String
        /// IAM ARN of the role to use to send application messages. Note: To write application messages to CloudWatch, the IAM role used must have the PutLogEvents policy action enabled.
        public let roleARN: String

        public init(cloudWatchLoggingOptionId: String? = nil, logStreamARN: String, roleARN: String) {
            self.cloudWatchLoggingOptionId = cloudWatchLoggingOptionId
            self.logStreamARN = logStreamARN
            self.roleARN = roleARN
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLoggingOptionId = "CloudWatchLoggingOptionId"
            case logStreamARN = "LogStreamARN"
            case roleARN = "RoleARN"
        }
    }

    public struct CloudWatchLoggingOptionUpdate: AWSEncodableShape {
        /// ID of the CloudWatch logging option to update
        public let cloudWatchLoggingOptionId: String
        /// ARN of the CloudWatch log to receive application messages.
        public let logStreamARNUpdate: String?
        /// IAM ARN of the role to use to send application messages. Note: To write application messages to CloudWatch, the IAM role used must have the PutLogEvents policy action enabled.
        public let roleARNUpdate: String?

        public init(cloudWatchLoggingOptionId: String, logStreamARNUpdate: String? = nil, roleARNUpdate: String? = nil) {
            self.cloudWatchLoggingOptionId = cloudWatchLoggingOptionId
            self.logStreamARNUpdate = logStreamARNUpdate
            self.roleARNUpdate = roleARNUpdate
        }

        public func validate(name: String) throws {
            try self.validate(self.cloudWatchLoggingOptionId, name: "cloudWatchLoggingOptionId", parent: name, max: 50)
            try self.validate(self.cloudWatchLoggingOptionId, name: "cloudWatchLoggingOptionId", parent: name, min: 1)
            try self.validate(self.cloudWatchLoggingOptionId, name: "cloudWatchLoggingOptionId", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.validate(self.logStreamARNUpdate, name: "logStreamARNUpdate", parent: name, max: 2048)
            try self.validate(self.logStreamARNUpdate, name: "logStreamARNUpdate", parent: name, min: 1)
            try self.validate(self.logStreamARNUpdate, name: "logStreamARNUpdate", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, max: 2048)
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, min: 1)
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLoggingOptionId = "CloudWatchLoggingOptionId"
            case logStreamARNUpdate = "LogStreamARNUpdate"
            case roleARNUpdate = "RoleARNUpdate"
        }
    }

    public struct CreateApplicationRequest: AWSEncodableShape {
        /// One or more SQL statements that read input data, transform it, and generate output. For example, you can write a SQL statement that reads data from one in-application stream, generates a running average of the number of advertisement clicks by vendor, and insert resulting rows in another in-application stream using pumps. For more information about the typical pattern, see Application Code.  You can provide such series of SQL statements, where output of one statement can be used as the input for the next statement. You store intermediate results by creating in-application streams and pumps. Note that the application code must create the streams with names specified in the Outputs. For example, if your Outputs defines output streams named ExampleOutputStream1 and ExampleOutputStream2, then your application code must create these streams.
        public let applicationCode: String?
        /// Summary description of the application.
        public let applicationDescription: String?
        /// Name of your Amazon Kinesis Analytics application (for example, sample-app).
        public let applicationName: String
        /// Use this parameter to configure a CloudWatch log stream to monitor application configuration errors. For more information, see Working with Amazon CloudWatch Logs.
        public let cloudWatchLoggingOptions: [CloudWatchLoggingOption]?
        /// Use this parameter to configure the application input. You can configure your application to receive input from a single streaming source. In this configuration, you map this streaming source to an in-application stream that is created. Your application code can then query the in-application stream like a table (you can think of it as a constantly updating table). For the streaming source, you provide its Amazon Resource Name (ARN) and format of data on the stream (for example, JSON, CSV, etc.). You also must provide an IAM role that Amazon Kinesis Analytics can assume to read this stream on your behalf. To create the in-application stream, you need to specify a schema to transform your data into a schematized version used in SQL. In the schema, you provide the necessary mapping of the data elements in the streaming source to record columns in the in-app stream.
        public let inputs: [Input]?
        /// You can configure application output to write data from any of the in-application streams to up to three destinations. These destinations can be Amazon Kinesis streams, Amazon Kinesis Firehose delivery streams, AWS Lambda destinations, or any combination of the three. In the configuration, you specify the in-application stream name, the destination stream or Lambda function Amazon Resource Name (ARN), and the format to use when writing data. You must also provide an IAM role that Amazon Kinesis Analytics can assume to write to the destination stream or Lambda function on your behalf. In the output configuration, you also provide the output stream or Lambda function ARN. For stream destinations, you provide the format of data in the stream (for example, JSON, CSV). You also must provide an IAM role that Amazon Kinesis Analytics can assume to write to the stream or Lambda function on your behalf.
        public let outputs: [Output]?
        /// A list of one or more tags to assign to the application. A tag is a key-value pair that identifies an application. Note that the maximum number of application tags includes system tags. The maximum number of user-defined application tags is 50. For more information, see Using Tagging.
        public let tags: [Tag]?

        public init(applicationCode: String? = nil, applicationDescription: String? = nil, applicationName: String, cloudWatchLoggingOptions: [CloudWatchLoggingOption]? = nil, inputs: [Input]? = nil, outputs: [Output]? = nil, tags: [Tag]? = nil) {
            self.applicationCode = applicationCode
            self.applicationDescription = applicationDescription
            self.applicationName = applicationName
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.inputs = inputs
            self.outputs = outputs
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationCode, name: "applicationCode", parent: name, max: 102_400)
            try self.validate(self.applicationCode, name: "applicationCode", parent: name, min: 0)
            try self.validate(self.applicationDescription, name: "applicationDescription", parent: name, max: 1024)
            try self.validate(self.applicationDescription, name: "applicationDescription", parent: name, min: 0)
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.cloudWatchLoggingOptions?.forEach {
                try $0.validate(name: "\(name).cloudWatchLoggingOptions[]")
            }
            try self.inputs?.forEach {
                try $0.validate(name: "\(name).inputs[]")
            }
            try self.outputs?.forEach {
                try $0.validate(name: "\(name).outputs[]")
            }
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationCode = "ApplicationCode"
            case applicationDescription = "ApplicationDescription"
            case applicationName = "ApplicationName"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case inputs = "Inputs"
            case outputs = "Outputs"
            case tags = "Tags"
        }
    }

    public struct CreateApplicationResponse: AWSDecodableShape {
        /// In response to your CreateApplication request, Amazon Kinesis Analytics returns a response with a summary of the application it created, including the application Amazon Resource Name (ARN), name, and status.
        public let applicationSummary: ApplicationSummary

        public init(applicationSummary: ApplicationSummary) {
            self.applicationSummary = applicationSummary
        }

        private enum CodingKeys: String, CodingKey {
            case applicationSummary = "ApplicationSummary"
        }
    }

    public struct DeleteApplicationCloudWatchLoggingOptionRequest: AWSEncodableShape {
        /// The Kinesis Analytics application name.
        public let applicationName: String
        /// The CloudWatchLoggingOptionId of the CloudWatch logging option to delete. You can get the CloudWatchLoggingOptionId by using the DescribeApplication operation.
        public let cloudWatchLoggingOptionId: String
        /// The version ID of the Kinesis Analytics application.
        public let currentApplicationVersionId: Int64

        public init(applicationName: String, cloudWatchLoggingOptionId: String, currentApplicationVersionId: Int64) {
            self.applicationName = applicationName
            self.cloudWatchLoggingOptionId = cloudWatchLoggingOptionId
            self.currentApplicationVersionId = currentApplicationVersionId
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.validate(self.cloudWatchLoggingOptionId, name: "cloudWatchLoggingOptionId", parent: name, max: 50)
            try self.validate(self.cloudWatchLoggingOptionId, name: "cloudWatchLoggingOptionId", parent: name, min: 1)
            try self.validate(self.cloudWatchLoggingOptionId, name: "cloudWatchLoggingOptionId", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, max: 999_999_999)
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "ApplicationName"
            case cloudWatchLoggingOptionId = "CloudWatchLoggingOptionId"
            case currentApplicationVersionId = "CurrentApplicationVersionId"
        }
    }

    public struct DeleteApplicationCloudWatchLoggingOptionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteApplicationInputProcessingConfigurationRequest: AWSEncodableShape {
        /// The Kinesis Analytics application name.
        public let applicationName: String
        /// The version ID of the Kinesis Analytics application.
        public let currentApplicationVersionId: Int64
        /// The ID of the input configuration from which to delete the input processing configuration. You can get a list of the input IDs for an application by using the DescribeApplication operation.
        public let inputId: String

        public init(applicationName: String, currentApplicationVersionId: Int64, inputId: String) {
            self.applicationName = applicationName
            self.currentApplicationVersionId = currentApplicationVersionId
            self.inputId = inputId
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, max: 999_999_999)
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, min: 1)
            try self.validate(self.inputId, name: "inputId", parent: name, max: 50)
            try self.validate(self.inputId, name: "inputId", parent: name, min: 1)
            try self.validate(self.inputId, name: "inputId", parent: name, pattern: "[a-zA-Z0-9_.-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "ApplicationName"
            case currentApplicationVersionId = "CurrentApplicationVersionId"
            case inputId = "InputId"
        }
    }

    public struct DeleteApplicationInputProcessingConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteApplicationOutputRequest: AWSEncodableShape {
        /// Amazon Kinesis Analytics application name.
        public let applicationName: String
        /// Amazon Kinesis Analytics application version. You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned.
        public let currentApplicationVersionId: Int64
        /// The ID of the configuration to delete. Each output configuration that is added to the application, either when the application is created or later using the AddApplicationOutput operation, has a unique ID. You need to provide the ID to uniquely identify the output configuration that you want to delete from the application configuration. You can use the DescribeApplication operation to get the specific OutputId.
        public let outputId: String

        public init(applicationName: String, currentApplicationVersionId: Int64, outputId: String) {
            self.applicationName = applicationName
            self.currentApplicationVersionId = currentApplicationVersionId
            self.outputId = outputId
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, max: 999_999_999)
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, min: 1)
            try self.validate(self.outputId, name: "outputId", parent: name, max: 50)
            try self.validate(self.outputId, name: "outputId", parent: name, min: 1)
            try self.validate(self.outputId, name: "outputId", parent: name, pattern: "[a-zA-Z0-9_.-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "ApplicationName"
            case currentApplicationVersionId = "CurrentApplicationVersionId"
            case outputId = "OutputId"
        }
    }

    public struct DeleteApplicationOutputResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteApplicationReferenceDataSourceRequest: AWSEncodableShape {
        /// Name of an existing application.
        public let applicationName: String
        /// Version of the application. You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned.
        public let currentApplicationVersionId: Int64
        /// ID of the reference data source. When you add a reference data source to your application using the AddApplicationReferenceDataSource, Amazon Kinesis Analytics assigns an ID. You can use the DescribeApplication operation to get the reference ID.
        public let referenceId: String

        public init(applicationName: String, currentApplicationVersionId: Int64, referenceId: String) {
            self.applicationName = applicationName
            self.currentApplicationVersionId = currentApplicationVersionId
            self.referenceId = referenceId
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, max: 999_999_999)
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, min: 1)
            try self.validate(self.referenceId, name: "referenceId", parent: name, max: 50)
            try self.validate(self.referenceId, name: "referenceId", parent: name, min: 1)
            try self.validate(self.referenceId, name: "referenceId", parent: name, pattern: "[a-zA-Z0-9_.-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "ApplicationName"
            case currentApplicationVersionId = "CurrentApplicationVersionId"
            case referenceId = "ReferenceId"
        }
    }

    public struct DeleteApplicationReferenceDataSourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteApplicationRequest: AWSEncodableShape {
        /// Name of the Amazon Kinesis Analytics application to delete.
        public let applicationName: String
        ///  You can use the DescribeApplication operation to get this value.
        public let createTimestamp: Date

        public init(applicationName: String, createTimestamp: Date) {
            self.applicationName = applicationName
            self.createTimestamp = createTimestamp
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "ApplicationName"
            case createTimestamp = "CreateTimestamp"
        }
    }

    public struct DeleteApplicationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeApplicationRequest: AWSEncodableShape {
        /// Name of the application.
        public let applicationName: String

        public init(applicationName: String) {
            self.applicationName = applicationName
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "ApplicationName"
        }
    }

    public struct DescribeApplicationResponse: AWSDecodableShape {
        /// Provides a description of the application, such as the application Amazon Resource Name (ARN), status, latest version, and input and output configuration details.
        public let applicationDetail: ApplicationDetail

        public init(applicationDetail: ApplicationDetail) {
            self.applicationDetail = applicationDetail
        }

        private enum CodingKeys: String, CodingKey {
            case applicationDetail = "ApplicationDetail"
        }
    }

    public struct DestinationSchema: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the format of the records on the output stream.
        public let recordFormatType: RecordFormatType

        public init(recordFormatType: RecordFormatType) {
            self.recordFormatType = recordFormatType
        }

        private enum CodingKeys: String, CodingKey {
            case recordFormatType = "RecordFormatType"
        }
    }

    public struct DiscoverInputSchemaRequest: AWSEncodableShape {
        /// The InputProcessingConfiguration to use to preprocess the records before discovering the schema of the records.
        public let inputProcessingConfiguration: InputProcessingConfiguration?
        /// Point at which you want Amazon Kinesis Analytics to start reading records from the specified streaming source discovery purposes.
        public let inputStartingPositionConfiguration: InputStartingPositionConfiguration?
        /// Amazon Resource Name (ARN) of the streaming source.
        public let resourceARN: String?
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream on your behalf.
        public let roleARN: String?
        /// Specify this parameter to discover a schema from data in an Amazon S3 object.
        public let s3Configuration: S3Configuration?

        public init(inputProcessingConfiguration: InputProcessingConfiguration? = nil, inputStartingPositionConfiguration: InputStartingPositionConfiguration? = nil, resourceARN: String? = nil, roleARN: String? = nil, s3Configuration: S3Configuration? = nil) {
            self.inputProcessingConfiguration = inputProcessingConfiguration
            self.inputStartingPositionConfiguration = inputStartingPositionConfiguration
            self.resourceARN = resourceARN
            self.roleARN = roleARN
            self.s3Configuration = s3Configuration
        }

        public func validate(name: String) throws {
            try self.inputProcessingConfiguration?.validate(name: "\(name).inputProcessingConfiguration")
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 2048)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 2048)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
            try self.s3Configuration?.validate(name: "\(name).s3Configuration")
        }

        private enum CodingKeys: String, CodingKey {
            case inputProcessingConfiguration = "InputProcessingConfiguration"
            case inputStartingPositionConfiguration = "InputStartingPositionConfiguration"
            case resourceARN = "ResourceARN"
            case roleARN = "RoleARN"
            case s3Configuration = "S3Configuration"
        }
    }

    public struct DiscoverInputSchemaResponse: AWSDecodableShape {
        /// Schema inferred from the streaming source. It identifies the format of the data in the streaming source and how each data element maps to corresponding columns in the in-application stream that you can create.
        public let inputSchema: SourceSchema?
        /// An array of elements, where each element corresponds to a row in a stream record (a stream record can have more than one row).
        public let parsedInputRecords: [[String]]?
        /// Stream data that was modified by the processor specified in the InputProcessingConfiguration parameter.
        public let processedInputRecords: [String]?
        /// Raw stream data that was sampled to infer the schema.
        public let rawInputRecords: [String]?

        public init(inputSchema: SourceSchema? = nil, parsedInputRecords: [[String]]? = nil, processedInputRecords: [String]? = nil, rawInputRecords: [String]? = nil) {
            self.inputSchema = inputSchema
            self.parsedInputRecords = parsedInputRecords
            self.processedInputRecords = processedInputRecords
            self.rawInputRecords = rawInputRecords
        }

        private enum CodingKeys: String, CodingKey {
            case inputSchema = "InputSchema"
            case parsedInputRecords = "ParsedInputRecords"
            case processedInputRecords = "ProcessedInputRecords"
            case rawInputRecords = "RawInputRecords"
        }
    }

    public struct Input: AWSEncodableShape {
        /// Describes the number of in-application streams to create.  Data from your source is routed to these in-application input streams.  (see Configuring Application Input.
        public let inputParallelism: InputParallelism?
        /// The InputProcessingConfiguration for the input. An input processor transforms records as they are received from the stream, before the application's SQL code executes. Currently, the only input processing configuration available is InputLambdaProcessor.
        public let inputProcessingConfiguration: InputProcessingConfiguration?
        /// Describes the format of the data in the streaming source, and how each data element maps to corresponding columns in the in-application stream that is being created. Also used to describe the format of the reference data source.
        public let inputSchema: SourceSchema
        /// If the streaming source is an Amazon Kinesis Firehose delivery stream, identifies the delivery stream's ARN and an IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf. Note: Either KinesisStreamsInput or KinesisFirehoseInput is required.
        public let kinesisFirehoseInput: KinesisFirehoseInput?
        /// If the streaming source is an Amazon Kinesis stream, identifies the stream's Amazon Resource Name (ARN) and an IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf. Note: Either KinesisStreamsInput or KinesisFirehoseInput is required.
        public let kinesisStreamsInput: KinesisStreamsInput?
        /// Name prefix to use when creating an in-application stream. Suppose that you specify a prefix "MyInApplicationStream." Amazon Kinesis Analytics then creates one or more (as per the InputParallelism count you specified) in-application streams with names "MyInApplicationStream_001," "MyInApplicationStream_002," and so on.
        public let namePrefix: String

        public init(inputParallelism: InputParallelism? = nil, inputProcessingConfiguration: InputProcessingConfiguration? = nil, inputSchema: SourceSchema, kinesisFirehoseInput: KinesisFirehoseInput? = nil, kinesisStreamsInput: KinesisStreamsInput? = nil, namePrefix: String) {
            self.inputParallelism = inputParallelism
            self.inputProcessingConfiguration = inputProcessingConfiguration
            self.inputSchema = inputSchema
            self.kinesisFirehoseInput = kinesisFirehoseInput
            self.kinesisStreamsInput = kinesisStreamsInput
            self.namePrefix = namePrefix
        }

        public func validate(name: String) throws {
            try self.inputParallelism?.validate(name: "\(name).inputParallelism")
            try self.inputProcessingConfiguration?.validate(name: "\(name).inputProcessingConfiguration")
            try self.inputSchema.validate(name: "\(name).inputSchema")
            try self.kinesisFirehoseInput?.validate(name: "\(name).kinesisFirehoseInput")
            try self.kinesisStreamsInput?.validate(name: "\(name).kinesisStreamsInput")
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, max: 32)
            try self.validate(self.namePrefix, name: "namePrefix", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case inputParallelism = "InputParallelism"
            case inputProcessingConfiguration = "InputProcessingConfiguration"
            case inputSchema = "InputSchema"
            case kinesisFirehoseInput = "KinesisFirehoseInput"
            case kinesisStreamsInput = "KinesisStreamsInput"
            case namePrefix = "NamePrefix"
        }
    }

    public struct InputConfiguration: AWSEncodableShape {
        /// Input source ID. You can get this ID by calling the DescribeApplication operation.
        public let id: String
        /// Point at which you want the application to start processing records from the streaming source.
        public let inputStartingPositionConfiguration: InputStartingPositionConfiguration

        public init(id: String, inputStartingPositionConfiguration: InputStartingPositionConfiguration) {
            self.id = id
            self.inputStartingPositionConfiguration = inputStartingPositionConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 50)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "[a-zA-Z0-9_.-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case inputStartingPositionConfiguration = "InputStartingPositionConfiguration"
        }
    }

    public struct InputDescription: AWSDecodableShape {
        /// Returns the in-application stream names that are mapped to the stream source.
        public let inAppStreamNames: [String]?
        /// Input ID associated with the application input. This is the ID that Amazon Kinesis Analytics assigns to each input configuration you add to your application.
        public let inputId: String?
        /// Describes the configured parallelism (number of in-application streams mapped to the streaming source).
        public let inputParallelism: InputParallelism?
        /// The description of the preprocessor that executes on records in this input before the application's code is run.
        public let inputProcessingConfigurationDescription: InputProcessingConfigurationDescription?
        /// Describes the format of the data in the streaming source, and how each data element maps to corresponding columns in the in-application stream that is being created.
        public let inputSchema: SourceSchema?
        /// Point at which the application is configured to read from the input stream.
        public let inputStartingPositionConfiguration: InputStartingPositionConfiguration?
        /// If an Amazon Kinesis Firehose delivery stream is configured as a streaming source, provides the delivery stream's ARN and an IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf.
        public let kinesisFirehoseInputDescription: KinesisFirehoseInputDescription?
        /// If an Amazon Kinesis stream is configured as streaming source, provides Amazon Kinesis stream's Amazon Resource Name (ARN) and an IAM role that enables Amazon Kinesis Analytics to access the stream on your behalf.
        public let kinesisStreamsInputDescription: KinesisStreamsInputDescription?
        /// In-application name prefix.
        public let namePrefix: String?

        public init(inAppStreamNames: [String]? = nil, inputId: String? = nil, inputParallelism: InputParallelism? = nil, inputProcessingConfigurationDescription: InputProcessingConfigurationDescription? = nil, inputSchema: SourceSchema? = nil, inputStartingPositionConfiguration: InputStartingPositionConfiguration? = nil, kinesisFirehoseInputDescription: KinesisFirehoseInputDescription? = nil, kinesisStreamsInputDescription: KinesisStreamsInputDescription? = nil, namePrefix: String? = nil) {
            self.inAppStreamNames = inAppStreamNames
            self.inputId = inputId
            self.inputParallelism = inputParallelism
            self.inputProcessingConfigurationDescription = inputProcessingConfigurationDescription
            self.inputSchema = inputSchema
            self.inputStartingPositionConfiguration = inputStartingPositionConfiguration
            self.kinesisFirehoseInputDescription = kinesisFirehoseInputDescription
            self.kinesisStreamsInputDescription = kinesisStreamsInputDescription
            self.namePrefix = namePrefix
        }

        private enum CodingKeys: String, CodingKey {
            case inAppStreamNames = "InAppStreamNames"
            case inputId = "InputId"
            case inputParallelism = "InputParallelism"
            case inputProcessingConfigurationDescription = "InputProcessingConfigurationDescription"
            case inputSchema = "InputSchema"
            case inputStartingPositionConfiguration = "InputStartingPositionConfiguration"
            case kinesisFirehoseInputDescription = "KinesisFirehoseInputDescription"
            case kinesisStreamsInputDescription = "KinesisStreamsInputDescription"
            case namePrefix = "NamePrefix"
        }
    }

    public struct InputLambdaProcessor: AWSEncodableShape {
        /// The ARN of the AWS Lambda function that operates on records in the stream.  To specify an earlier version of the Lambda function than the latest, include the Lambda function version in the Lambda function ARN. For more information about Lambda ARNs, see Example ARNs: AWS Lambda
        public let resourceARN: String
        /// The ARN of the IAM role that is used to access the AWS Lambda function.
        public let roleARN: String

        public init(resourceARN: String, roleARN: String) {
            self.resourceARN = resourceARN
            self.roleARN = roleARN
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 2048)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 2048)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case roleARN = "RoleARN"
        }
    }

    public struct InputLambdaProcessorDescription: AWSDecodableShape {
        /// The ARN of the AWS Lambda function that is used to preprocess the records in the stream.
        public let resourceARN: String?
        /// The ARN of the IAM role that is used to access the AWS Lambda function.
        public let roleARN: String?

        public init(resourceARN: String? = nil, roleARN: String? = nil) {
            self.resourceARN = resourceARN
            self.roleARN = roleARN
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case roleARN = "RoleARN"
        }
    }

    public struct InputLambdaProcessorUpdate: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the new AWS Lambda function that is used to preprocess the records in the stream.  To specify an earlier version of the Lambda function than the latest, include the Lambda function version in the Lambda function ARN. For more information about Lambda ARNs, see Example ARNs: AWS Lambda
        public let resourceARNUpdate: String?
        /// The ARN of the new IAM role that is used to access the AWS Lambda function.
        public let roleARNUpdate: String?

        public init(resourceARNUpdate: String? = nil, roleARNUpdate: String? = nil) {
            self.resourceARNUpdate = resourceARNUpdate
            self.roleARNUpdate = roleARNUpdate
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, max: 2048)
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, min: 1)
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, max: 2048)
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, min: 1)
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARNUpdate = "ResourceARNUpdate"
            case roleARNUpdate = "RoleARNUpdate"
        }
    }

    public struct InputParallelism: AWSEncodableShape & AWSDecodableShape {
        /// Number of in-application streams to create. For more information, see Limits.
        public let count: Int?

        public init(count: Int? = nil) {
            self.count = count
        }

        public func validate(name: String) throws {
            try self.validate(self.count, name: "count", parent: name, max: 64)
            try self.validate(self.count, name: "count", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case count = "Count"
        }
    }

    public struct InputParallelismUpdate: AWSEncodableShape {
        /// Number of in-application streams to create for the specified streaming source.
        public let countUpdate: Int?

        public init(countUpdate: Int? = nil) {
            self.countUpdate = countUpdate
        }

        public func validate(name: String) throws {
            try self.validate(self.countUpdate, name: "countUpdate", parent: name, max: 64)
            try self.validate(self.countUpdate, name: "countUpdate", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case countUpdate = "CountUpdate"
        }
    }

    public struct InputProcessingConfiguration: AWSEncodableShape {
        /// The InputLambdaProcessor that is used to preprocess the records in the stream before being processed by your application code.
        public let inputLambdaProcessor: InputLambdaProcessor

        public init(inputLambdaProcessor: InputLambdaProcessor) {
            self.inputLambdaProcessor = inputLambdaProcessor
        }

        public func validate(name: String) throws {
            try self.inputLambdaProcessor.validate(name: "\(name).inputLambdaProcessor")
        }

        private enum CodingKeys: String, CodingKey {
            case inputLambdaProcessor = "InputLambdaProcessor"
        }
    }

    public struct InputProcessingConfigurationDescription: AWSDecodableShape {
        /// Provides configuration information about the associated InputLambdaProcessorDescription.
        public let inputLambdaProcessorDescription: InputLambdaProcessorDescription?

        public init(inputLambdaProcessorDescription: InputLambdaProcessorDescription? = nil) {
            self.inputLambdaProcessorDescription = inputLambdaProcessorDescription
        }

        private enum CodingKeys: String, CodingKey {
            case inputLambdaProcessorDescription = "InputLambdaProcessorDescription"
        }
    }

    public struct InputProcessingConfigurationUpdate: AWSEncodableShape {
        /// Provides update information for an InputLambdaProcessor.
        public let inputLambdaProcessorUpdate: InputLambdaProcessorUpdate

        public init(inputLambdaProcessorUpdate: InputLambdaProcessorUpdate) {
            self.inputLambdaProcessorUpdate = inputLambdaProcessorUpdate
        }

        public func validate(name: String) throws {
            try self.inputLambdaProcessorUpdate.validate(name: "\(name).inputLambdaProcessorUpdate")
        }

        private enum CodingKeys: String, CodingKey {
            case inputLambdaProcessorUpdate = "InputLambdaProcessorUpdate"
        }
    }

    public struct InputSchemaUpdate: AWSEncodableShape {
        /// A list of RecordColumn objects. Each object describes the mapping of the streaming source element to the corresponding column in the in-application stream.
        public let recordColumnUpdates: [RecordColumn]?
        /// Specifies the encoding of the records in the streaming source. For example, UTF-8.
        public let recordEncodingUpdate: String?
        /// Specifies the format of the records on the streaming source.
        public let recordFormatUpdate: RecordFormat?

        public init(recordColumnUpdates: [RecordColumn]? = nil, recordEncodingUpdate: String? = nil, recordFormatUpdate: RecordFormat? = nil) {
            self.recordColumnUpdates = recordColumnUpdates
            self.recordEncodingUpdate = recordEncodingUpdate
            self.recordFormatUpdate = recordFormatUpdate
        }

        public func validate(name: String) throws {
            try self.recordColumnUpdates?.forEach {
                try $0.validate(name: "\(name).recordColumnUpdates[]")
            }
            try self.validate(self.recordColumnUpdates, name: "recordColumnUpdates", parent: name, max: 1000)
            try self.validate(self.recordColumnUpdates, name: "recordColumnUpdates", parent: name, min: 1)
            try self.validate(self.recordEncodingUpdate, name: "recordEncodingUpdate", parent: name, pattern: "UTF-8")
            try self.recordFormatUpdate?.validate(name: "\(name).recordFormatUpdate")
        }

        private enum CodingKeys: String, CodingKey {
            case recordColumnUpdates = "RecordColumnUpdates"
            case recordEncodingUpdate = "RecordEncodingUpdate"
            case recordFormatUpdate = "RecordFormatUpdate"
        }
    }

    public struct InputStartingPositionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The starting position on the stream.    NOW - Start reading just after the most recent record in the stream, start at the request time stamp that the customer issued.    TRIM_HORIZON - Start reading at the last untrimmed record in the stream, which is the oldest record available in the stream. This option is not available for an Amazon Kinesis Firehose delivery stream.    LAST_STOPPED_POINT - Resume reading from where the application last stopped reading.
        public let inputStartingPosition: InputStartingPosition?

        public init(inputStartingPosition: InputStartingPosition? = nil) {
            self.inputStartingPosition = inputStartingPosition
        }

        private enum CodingKeys: String, CodingKey {
            case inputStartingPosition = "InputStartingPosition"
        }
    }

    public struct InputUpdate: AWSEncodableShape {
        /// Input ID of the application input to be updated.
        public let inputId: String
        /// Describes the parallelism updates (the number in-application streams Amazon Kinesis Analytics creates for the specific streaming source).
        public let inputParallelismUpdate: InputParallelismUpdate?
        /// Describes updates for an input processing configuration.
        public let inputProcessingConfigurationUpdate: InputProcessingConfigurationUpdate?
        /// Describes the data format on the streaming source, and how record elements on the streaming source map to columns of the in-application stream that is created.
        public let inputSchemaUpdate: InputSchemaUpdate?
        /// If an Amazon Kinesis Firehose delivery stream is the streaming source to be updated, provides an updated stream ARN and IAM role ARN.
        public let kinesisFirehoseInputUpdate: KinesisFirehoseInputUpdate?
        /// If an Amazon Kinesis stream is the streaming source to be updated, provides an updated stream Amazon Resource Name (ARN) and IAM role ARN.
        public let kinesisStreamsInputUpdate: KinesisStreamsInputUpdate?
        /// Name prefix for in-application streams that Amazon Kinesis Analytics creates for the specific streaming source.
        public let namePrefixUpdate: String?

        public init(inputId: String, inputParallelismUpdate: InputParallelismUpdate? = nil, inputProcessingConfigurationUpdate: InputProcessingConfigurationUpdate? = nil, inputSchemaUpdate: InputSchemaUpdate? = nil, kinesisFirehoseInputUpdate: KinesisFirehoseInputUpdate? = nil, kinesisStreamsInputUpdate: KinesisStreamsInputUpdate? = nil, namePrefixUpdate: String? = nil) {
            self.inputId = inputId
            self.inputParallelismUpdate = inputParallelismUpdate
            self.inputProcessingConfigurationUpdate = inputProcessingConfigurationUpdate
            self.inputSchemaUpdate = inputSchemaUpdate
            self.kinesisFirehoseInputUpdate = kinesisFirehoseInputUpdate
            self.kinesisStreamsInputUpdate = kinesisStreamsInputUpdate
            self.namePrefixUpdate = namePrefixUpdate
        }

        public func validate(name: String) throws {
            try self.validate(self.inputId, name: "inputId", parent: name, max: 50)
            try self.validate(self.inputId, name: "inputId", parent: name, min: 1)
            try self.validate(self.inputId, name: "inputId", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.inputParallelismUpdate?.validate(name: "\(name).inputParallelismUpdate")
            try self.inputProcessingConfigurationUpdate?.validate(name: "\(name).inputProcessingConfigurationUpdate")
            try self.inputSchemaUpdate?.validate(name: "\(name).inputSchemaUpdate")
            try self.kinesisFirehoseInputUpdate?.validate(name: "\(name).kinesisFirehoseInputUpdate")
            try self.kinesisStreamsInputUpdate?.validate(name: "\(name).kinesisStreamsInputUpdate")
            try self.validate(self.namePrefixUpdate, name: "namePrefixUpdate", parent: name, max: 32)
            try self.validate(self.namePrefixUpdate, name: "namePrefixUpdate", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case inputId = "InputId"
            case inputParallelismUpdate = "InputParallelismUpdate"
            case inputProcessingConfigurationUpdate = "InputProcessingConfigurationUpdate"
            case inputSchemaUpdate = "InputSchemaUpdate"
            case kinesisFirehoseInputUpdate = "KinesisFirehoseInputUpdate"
            case kinesisStreamsInputUpdate = "KinesisStreamsInputUpdate"
            case namePrefixUpdate = "NamePrefixUpdate"
        }
    }

    public struct JSONMappingParameters: AWSEncodableShape & AWSDecodableShape {
        /// Path to the top-level parent that contains the records.
        public let recordRowPath: String

        public init(recordRowPath: String) {
            self.recordRowPath = recordRowPath
        }

        public func validate(name: String) throws {
            try self.validate(self.recordRowPath, name: "recordRowPath", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case recordRowPath = "RecordRowPath"
        }
    }

    public struct KinesisFirehoseInput: AWSEncodableShape {
        /// ARN of the input delivery stream.
        public let resourceARN: String
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream on your behalf. You need to make sure that the role has the necessary permissions to access the stream.
        public let roleARN: String

        public init(resourceARN: String, roleARN: String) {
            self.resourceARN = resourceARN
            self.roleARN = roleARN
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 2048)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 2048)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case roleARN = "RoleARN"
        }
    }

    public struct KinesisFirehoseInputDescription: AWSDecodableShape {
        /// Amazon Resource Name (ARN) of the Amazon Kinesis Firehose delivery stream.
        public let resourceARN: String?
        /// ARN of the IAM role that Amazon Kinesis Analytics assumes to access the stream.
        public let roleARN: String?

        public init(resourceARN: String? = nil, roleARN: String? = nil) {
            self.resourceARN = resourceARN
            self.roleARN = roleARN
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case roleARN = "RoleARN"
        }
    }

    public struct KinesisFirehoseInputUpdate: AWSEncodableShape {
        /// Amazon Resource Name (ARN) of the input Amazon Kinesis Firehose delivery stream to read.
        public let resourceARNUpdate: String?
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream on your behalf. You need to grant the necessary permissions to this role.
        public let roleARNUpdate: String?

        public init(resourceARNUpdate: String? = nil, roleARNUpdate: String? = nil) {
            self.resourceARNUpdate = resourceARNUpdate
            self.roleARNUpdate = roleARNUpdate
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, max: 2048)
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, min: 1)
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, max: 2048)
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, min: 1)
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARNUpdate = "ResourceARNUpdate"
            case roleARNUpdate = "RoleARNUpdate"
        }
    }

    public struct KinesisFirehoseOutput: AWSEncodableShape {
        /// ARN of the destination Amazon Kinesis Firehose delivery stream to write to.
        public let resourceARN: String
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to write to the destination stream on your behalf. You need to grant the necessary permissions to this role.
        public let roleARN: String

        public init(resourceARN: String, roleARN: String) {
            self.resourceARN = resourceARN
            self.roleARN = roleARN
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 2048)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 2048)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case roleARN = "RoleARN"
        }
    }

    public struct KinesisFirehoseOutputDescription: AWSDecodableShape {
        /// Amazon Resource Name (ARN) of the Amazon Kinesis Firehose delivery stream.
        public let resourceARN: String?
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream.
        public let roleARN: String?

        public init(resourceARN: String? = nil, roleARN: String? = nil) {
            self.resourceARN = resourceARN
            self.roleARN = roleARN
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case roleARN = "RoleARN"
        }
    }

    public struct KinesisFirehoseOutputUpdate: AWSEncodableShape {
        /// Amazon Resource Name (ARN) of the Amazon Kinesis Firehose delivery stream to write to.
        public let resourceARNUpdate: String?
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream on your behalf. You need to grant the necessary permissions to this role.
        public let roleARNUpdate: String?

        public init(resourceARNUpdate: String? = nil, roleARNUpdate: String? = nil) {
            self.resourceARNUpdate = resourceARNUpdate
            self.roleARNUpdate = roleARNUpdate
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, max: 2048)
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, min: 1)
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, max: 2048)
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, min: 1)
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARNUpdate = "ResourceARNUpdate"
            case roleARNUpdate = "RoleARNUpdate"
        }
    }

    public struct KinesisStreamsInput: AWSEncodableShape {
        /// ARN of the input Amazon Kinesis stream to read.
        public let resourceARN: String
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream on your behalf. You need to grant the necessary permissions to this role.
        public let roleARN: String

        public init(resourceARN: String, roleARN: String) {
            self.resourceARN = resourceARN
            self.roleARN = roleARN
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 2048)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 2048)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case roleARN = "RoleARN"
        }
    }

    public struct KinesisStreamsInputDescription: AWSDecodableShape {
        /// Amazon Resource Name (ARN) of the Amazon Kinesis stream.
        public let resourceARN: String?
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream.
        public let roleARN: String?

        public init(resourceARN: String? = nil, roleARN: String? = nil) {
            self.resourceARN = resourceARN
            self.roleARN = roleARN
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case roleARN = "RoleARN"
        }
    }

    public struct KinesisStreamsInputUpdate: AWSEncodableShape {
        /// Amazon Resource Name (ARN) of the input Amazon Kinesis stream to read.
        public let resourceARNUpdate: String?
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream on your behalf. You need to grant the necessary permissions to this role.
        public let roleARNUpdate: String?

        public init(resourceARNUpdate: String? = nil, roleARNUpdate: String? = nil) {
            self.resourceARNUpdate = resourceARNUpdate
            self.roleARNUpdate = roleARNUpdate
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, max: 2048)
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, min: 1)
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, max: 2048)
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, min: 1)
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARNUpdate = "ResourceARNUpdate"
            case roleARNUpdate = "RoleARNUpdate"
        }
    }

    public struct KinesisStreamsOutput: AWSEncodableShape {
        /// ARN of the destination Amazon Kinesis stream to write to.
        public let resourceARN: String
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to write to the destination stream on your behalf. You need to grant the necessary permissions to this role.
        public let roleARN: String

        public init(resourceARN: String, roleARN: String) {
            self.resourceARN = resourceARN
            self.roleARN = roleARN
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 2048)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 2048)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case roleARN = "RoleARN"
        }
    }

    public struct KinesisStreamsOutputDescription: AWSDecodableShape {
        /// Amazon Resource Name (ARN) of the Amazon Kinesis stream.
        public let resourceARN: String?
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream.
        public let roleARN: String?

        public init(resourceARN: String? = nil, roleARN: String? = nil) {
            self.resourceARN = resourceARN
            self.roleARN = roleARN
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case roleARN = "RoleARN"
        }
    }

    public struct KinesisStreamsOutputUpdate: AWSEncodableShape {
        /// Amazon Resource Name (ARN) of the Amazon Kinesis stream where you want to write the output.
        public let resourceARNUpdate: String?
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream on your behalf. You need to grant the necessary permissions to this role.
        public let roleARNUpdate: String?

        public init(resourceARNUpdate: String? = nil, roleARNUpdate: String? = nil) {
            self.resourceARNUpdate = resourceARNUpdate
            self.roleARNUpdate = roleARNUpdate
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, max: 2048)
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, min: 1)
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, max: 2048)
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, min: 1)
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARNUpdate = "ResourceARNUpdate"
            case roleARNUpdate = "RoleARNUpdate"
        }
    }

    public struct LambdaOutput: AWSEncodableShape {
        /// Amazon Resource Name (ARN) of the destination Lambda function to write to.  To specify an earlier version of the Lambda function than the latest, include the Lambda function version in the Lambda function ARN. For more information about Lambda ARNs, see Example ARNs: AWS Lambda
        public let resourceARN: String
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to write to the destination function on your behalf. You need to grant the necessary permissions to this role.
        public let roleARN: String

        public init(resourceARN: String, roleARN: String) {
            self.resourceARN = resourceARN
            self.roleARN = roleARN
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 2048)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 2048)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case roleARN = "RoleARN"
        }
    }

    public struct LambdaOutputDescription: AWSDecodableShape {
        /// Amazon Resource Name (ARN) of the destination Lambda function.
        public let resourceARN: String?
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to write to the destination function.
        public let roleARN: String?

        public init(resourceARN: String? = nil, roleARN: String? = nil) {
            self.resourceARN = resourceARN
            self.roleARN = roleARN
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case roleARN = "RoleARN"
        }
    }

    public struct LambdaOutputUpdate: AWSEncodableShape {
        /// Amazon Resource Name (ARN) of the destination Lambda function.  To specify an earlier version of the Lambda function than the latest, include the Lambda function version in the Lambda function ARN. For more information about Lambda ARNs, see Example ARNs: AWS Lambda
        public let resourceARNUpdate: String?
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to write to the destination function on your behalf. You need to grant the necessary permissions to this role.
        public let roleARNUpdate: String?

        public init(resourceARNUpdate: String? = nil, roleARNUpdate: String? = nil) {
            self.resourceARNUpdate = resourceARNUpdate
            self.roleARNUpdate = roleARNUpdate
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, max: 2048)
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, min: 1)
            try self.validate(self.resourceARNUpdate, name: "resourceARNUpdate", parent: name, pattern: "arn:.*")
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, max: 2048)
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, min: 1)
            try self.validate(self.roleARNUpdate, name: "roleARNUpdate", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARNUpdate = "ResourceARNUpdate"
            case roleARNUpdate = "RoleARNUpdate"
        }
    }

    public struct ListApplicationsRequest: AWSEncodableShape {
        /// Name of the application to start the list with. When using pagination to retrieve the list, you don't need to specify this parameter in the first request. However, in subsequent requests, you add the last application name from the previous response to get the next page of applications.
        public let exclusiveStartApplicationName: String?
        /// Maximum number of applications to list.
        public let limit: Int?

        public init(exclusiveStartApplicationName: String? = nil, limit: Int? = nil) {
            self.exclusiveStartApplicationName = exclusiveStartApplicationName
            self.limit = limit
        }

        public func validate(name: String) throws {
            try self.validate(self.exclusiveStartApplicationName, name: "exclusiveStartApplicationName", parent: name, max: 128)
            try self.validate(self.exclusiveStartApplicationName, name: "exclusiveStartApplicationName", parent: name, min: 1)
            try self.validate(self.exclusiveStartApplicationName, name: "exclusiveStartApplicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case exclusiveStartApplicationName = "ExclusiveStartApplicationName"
            case limit = "Limit"
        }
    }

    public struct ListApplicationsResponse: AWSDecodableShape {
        /// List of ApplicationSummary objects.
        public let applicationSummaries: [ApplicationSummary]
        /// Returns true if there are more applications to retrieve.
        public let hasMoreApplications: Bool

        public init(applicationSummaries: [ApplicationSummary], hasMoreApplications: Bool) {
            self.applicationSummaries = applicationSummaries
            self.hasMoreApplications = hasMoreApplications
        }

        private enum CodingKeys: String, CodingKey {
            case applicationSummaries = "ApplicationSummaries"
            case hasMoreApplications = "HasMoreApplications"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The ARN of the application for which to retrieve tags.
        public let resourceARN: String

        public init(resourceARN: String) {
            self.resourceARN = resourceARN
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 2048)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "arn:aws:kinesisanalytics:[a-z]{2}-[a-z]+-\\d{1}+:\\d{12}+:application/[a-zA-Z0-9_.-]{1,128}")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The key-value tags assigned to the application.
        public let tags: [Tag]?

        public init(tags: [Tag]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct MappingParameters: AWSEncodableShape & AWSDecodableShape {
        /// Provides additional mapping information when the record format uses delimiters (for example, CSV).
        public let cSVMappingParameters: CSVMappingParameters?
        /// Provides additional mapping information when JSON is the record format on the streaming source.
        public let jSONMappingParameters: JSONMappingParameters?

        public init(cSVMappingParameters: CSVMappingParameters? = nil, jSONMappingParameters: JSONMappingParameters? = nil) {
            self.cSVMappingParameters = cSVMappingParameters
            self.jSONMappingParameters = jSONMappingParameters
        }

        public func validate(name: String) throws {
            try self.cSVMappingParameters?.validate(name: "\(name).cSVMappingParameters")
            try self.jSONMappingParameters?.validate(name: "\(name).jSONMappingParameters")
        }

        private enum CodingKeys: String, CodingKey {
            case cSVMappingParameters = "CSVMappingParameters"
            case jSONMappingParameters = "JSONMappingParameters"
        }
    }

    public struct Output: AWSEncodableShape {
        /// Describes the data format when records are written to the destination. For more information, see Configuring Application Output.
        public let destinationSchema: DestinationSchema
        /// Identifies an Amazon Kinesis Firehose delivery stream as the destination.
        public let kinesisFirehoseOutput: KinesisFirehoseOutput?
        /// Identifies an Amazon Kinesis stream as the destination.
        public let kinesisStreamsOutput: KinesisStreamsOutput?
        /// Identifies an AWS Lambda function as the destination.
        public let lambdaOutput: LambdaOutput?
        /// Name of the in-application stream.
        public let name: String

        public init(destinationSchema: DestinationSchema, kinesisFirehoseOutput: KinesisFirehoseOutput? = nil, kinesisStreamsOutput: KinesisStreamsOutput? = nil, lambdaOutput: LambdaOutput? = nil, name: String) {
            self.destinationSchema = destinationSchema
            self.kinesisFirehoseOutput = kinesisFirehoseOutput
            self.kinesisStreamsOutput = kinesisStreamsOutput
            self.lambdaOutput = lambdaOutput
            self.name = name
        }

        public func validate(name: String) throws {
            try self.kinesisFirehoseOutput?.validate(name: "\(name).kinesisFirehoseOutput")
            try self.kinesisStreamsOutput?.validate(name: "\(name).kinesisStreamsOutput")
            try self.lambdaOutput?.validate(name: "\(name).lambdaOutput")
            try self.validate(self.name, name: "name", parent: name, max: 32)
            try self.validate(self.name, name: "name", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case destinationSchema = "DestinationSchema"
            case kinesisFirehoseOutput = "KinesisFirehoseOutput"
            case kinesisStreamsOutput = "KinesisStreamsOutput"
            case lambdaOutput = "LambdaOutput"
            case name = "Name"
        }
    }

    public struct OutputDescription: AWSDecodableShape {
        /// Data format used for writing data to the destination.
        public let destinationSchema: DestinationSchema?
        /// Describes the Amazon Kinesis Firehose delivery stream configured as the destination where output is written.
        public let kinesisFirehoseOutputDescription: KinesisFirehoseOutputDescription?
        /// Describes Amazon Kinesis stream configured as the destination where output is written.
        public let kinesisStreamsOutputDescription: KinesisStreamsOutputDescription?
        /// Describes the AWS Lambda function configured as the destination where output is written.
        public let lambdaOutputDescription: LambdaOutputDescription?
        /// Name of the in-application stream configured as output.
        public let name: String?
        /// A unique identifier for the output configuration.
        public let outputId: String?

        public init(destinationSchema: DestinationSchema? = nil, kinesisFirehoseOutputDescription: KinesisFirehoseOutputDescription? = nil, kinesisStreamsOutputDescription: KinesisStreamsOutputDescription? = nil, lambdaOutputDescription: LambdaOutputDescription? = nil, name: String? = nil, outputId: String? = nil) {
            self.destinationSchema = destinationSchema
            self.kinesisFirehoseOutputDescription = kinesisFirehoseOutputDescription
            self.kinesisStreamsOutputDescription = kinesisStreamsOutputDescription
            self.lambdaOutputDescription = lambdaOutputDescription
            self.name = name
            self.outputId = outputId
        }

        private enum CodingKeys: String, CodingKey {
            case destinationSchema = "DestinationSchema"
            case kinesisFirehoseOutputDescription = "KinesisFirehoseOutputDescription"
            case kinesisStreamsOutputDescription = "KinesisStreamsOutputDescription"
            case lambdaOutputDescription = "LambdaOutputDescription"
            case name = "Name"
            case outputId = "OutputId"
        }
    }

    public struct OutputUpdate: AWSEncodableShape {
        /// Describes the data format when records are written to the destination. For more information, see Configuring Application Output.
        public let destinationSchemaUpdate: DestinationSchema?
        /// Describes an Amazon Kinesis Firehose delivery stream as the destination for the output.
        public let kinesisFirehoseOutputUpdate: KinesisFirehoseOutputUpdate?
        /// Describes an Amazon Kinesis stream as the destination for the output.
        public let kinesisStreamsOutputUpdate: KinesisStreamsOutputUpdate?
        /// Describes an AWS Lambda function as the destination for the output.
        public let lambdaOutputUpdate: LambdaOutputUpdate?
        /// If you want to specify a different in-application stream for this output configuration, use this field to specify the new in-application stream name.
        public let nameUpdate: String?
        /// Identifies the specific output configuration that you want to update.
        public let outputId: String

        public init(destinationSchemaUpdate: DestinationSchema? = nil, kinesisFirehoseOutputUpdate: KinesisFirehoseOutputUpdate? = nil, kinesisStreamsOutputUpdate: KinesisStreamsOutputUpdate? = nil, lambdaOutputUpdate: LambdaOutputUpdate? = nil, nameUpdate: String? = nil, outputId: String) {
            self.destinationSchemaUpdate = destinationSchemaUpdate
            self.kinesisFirehoseOutputUpdate = kinesisFirehoseOutputUpdate
            self.kinesisStreamsOutputUpdate = kinesisStreamsOutputUpdate
            self.lambdaOutputUpdate = lambdaOutputUpdate
            self.nameUpdate = nameUpdate
            self.outputId = outputId
        }

        public func validate(name: String) throws {
            try self.kinesisFirehoseOutputUpdate?.validate(name: "\(name).kinesisFirehoseOutputUpdate")
            try self.kinesisStreamsOutputUpdate?.validate(name: "\(name).kinesisStreamsOutputUpdate")
            try self.lambdaOutputUpdate?.validate(name: "\(name).lambdaOutputUpdate")
            try self.validate(self.nameUpdate, name: "nameUpdate", parent: name, max: 32)
            try self.validate(self.nameUpdate, name: "nameUpdate", parent: name, min: 1)
            try self.validate(self.outputId, name: "outputId", parent: name, max: 50)
            try self.validate(self.outputId, name: "outputId", parent: name, min: 1)
            try self.validate(self.outputId, name: "outputId", parent: name, pattern: "[a-zA-Z0-9_.-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case destinationSchemaUpdate = "DestinationSchemaUpdate"
            case kinesisFirehoseOutputUpdate = "KinesisFirehoseOutputUpdate"
            case kinesisStreamsOutputUpdate = "KinesisStreamsOutputUpdate"
            case lambdaOutputUpdate = "LambdaOutputUpdate"
            case nameUpdate = "NameUpdate"
            case outputId = "OutputId"
        }
    }

    public struct RecordColumn: AWSEncodableShape & AWSDecodableShape {
        /// Reference to the data element in the streaming input or the reference data source. This element is required if the RecordFormatType is JSON.
        public let mapping: String?
        /// Name of the column created in the in-application input stream or reference table.
        public let name: String
        /// Type of column created in the in-application input stream or reference table.
        public let sqlType: String

        public init(mapping: String? = nil, name: String, sqlType: String) {
            self.mapping = mapping
            self.name = name
            self.sqlType = sqlType
        }

        public func validate(name: String) throws {
            try self.validate(self.sqlType, name: "sqlType", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case mapping = "Mapping"
            case name = "Name"
            case sqlType = "SqlType"
        }
    }

    public struct RecordFormat: AWSEncodableShape & AWSDecodableShape {
        /// When configuring application input at the time of creating or updating an application, provides additional mapping information specific to the record format (such as JSON, CSV, or record fields delimited by some delimiter) on the streaming source.
        public let mappingParameters: MappingParameters?
        /// The type of record format.
        public let recordFormatType: RecordFormatType

        public init(mappingParameters: MappingParameters? = nil, recordFormatType: RecordFormatType) {
            self.mappingParameters = mappingParameters
            self.recordFormatType = recordFormatType
        }

        public func validate(name: String) throws {
            try self.mappingParameters?.validate(name: "\(name).mappingParameters")
        }

        private enum CodingKeys: String, CodingKey {
            case mappingParameters = "MappingParameters"
            case recordFormatType = "RecordFormatType"
        }
    }

    public struct ReferenceDataSource: AWSEncodableShape {
        /// Describes the format of the data in the streaming source, and how each data element maps to corresponding columns created in the in-application stream.
        public let referenceSchema: SourceSchema
        /// Identifies the S3 bucket and object that contains the reference data. Also identifies the IAM role Amazon Kinesis Analytics can assume to read this object on your behalf. An Amazon Kinesis Analytics application loads reference data only once. If the data changes, you call the UpdateApplication operation to trigger reloading of data into your application.
        public let s3ReferenceDataSource: S3ReferenceDataSource?
        /// Name of the in-application table to create.
        public let tableName: String

        public init(referenceSchema: SourceSchema, s3ReferenceDataSource: S3ReferenceDataSource? = nil, tableName: String) {
            self.referenceSchema = referenceSchema
            self.s3ReferenceDataSource = s3ReferenceDataSource
            self.tableName = tableName
        }

        public func validate(name: String) throws {
            try self.referenceSchema.validate(name: "\(name).referenceSchema")
            try self.s3ReferenceDataSource?.validate(name: "\(name).s3ReferenceDataSource")
            try self.validate(self.tableName, name: "tableName", parent: name, max: 32)
            try self.validate(self.tableName, name: "tableName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case referenceSchema = "ReferenceSchema"
            case s3ReferenceDataSource = "S3ReferenceDataSource"
            case tableName = "TableName"
        }
    }

    public struct ReferenceDataSourceDescription: AWSDecodableShape {
        /// ID of the reference data source. This is the ID that Amazon Kinesis Analytics assigns when you add the reference data source to your application using the AddApplicationReferenceDataSource operation.
        public let referenceId: String
        /// Describes the format of the data in the streaming source, and how each data element maps to corresponding columns created in the in-application stream.
        public let referenceSchema: SourceSchema?
        /// Provides the S3 bucket name, the object key name that contains the reference data. It also provides the Amazon Resource Name (ARN) of the IAM role that Amazon Kinesis Analytics can assume to read the Amazon S3 object and populate the in-application reference table.
        public let s3ReferenceDataSourceDescription: S3ReferenceDataSourceDescription
        /// The in-application table name created by the specific reference data source configuration.
        public let tableName: String

        public init(referenceId: String, referenceSchema: SourceSchema? = nil, s3ReferenceDataSourceDescription: S3ReferenceDataSourceDescription, tableName: String) {
            self.referenceId = referenceId
            self.referenceSchema = referenceSchema
            self.s3ReferenceDataSourceDescription = s3ReferenceDataSourceDescription
            self.tableName = tableName
        }

        private enum CodingKeys: String, CodingKey {
            case referenceId = "ReferenceId"
            case referenceSchema = "ReferenceSchema"
            case s3ReferenceDataSourceDescription = "S3ReferenceDataSourceDescription"
            case tableName = "TableName"
        }
    }

    public struct ReferenceDataSourceUpdate: AWSEncodableShape {
        /// ID of the reference data source being updated. You can use the DescribeApplication operation to get this value.
        public let referenceId: String
        /// Describes the format of the data in the streaming source, and how each data element maps to corresponding columns created in the in-application stream.
        public let referenceSchemaUpdate: SourceSchema?
        /// Describes the S3 bucket name, object key name, and IAM role that Amazon Kinesis Analytics can assume to read the Amazon S3 object on your behalf and populate the in-application reference table.
        public let s3ReferenceDataSourceUpdate: S3ReferenceDataSourceUpdate?
        /// In-application table name that is created by this update.
        public let tableNameUpdate: String?

        public init(referenceId: String, referenceSchemaUpdate: SourceSchema? = nil, s3ReferenceDataSourceUpdate: S3ReferenceDataSourceUpdate? = nil, tableNameUpdate: String? = nil) {
            self.referenceId = referenceId
            self.referenceSchemaUpdate = referenceSchemaUpdate
            self.s3ReferenceDataSourceUpdate = s3ReferenceDataSourceUpdate
            self.tableNameUpdate = tableNameUpdate
        }

        public func validate(name: String) throws {
            try self.validate(self.referenceId, name: "referenceId", parent: name, max: 50)
            try self.validate(self.referenceId, name: "referenceId", parent: name, min: 1)
            try self.validate(self.referenceId, name: "referenceId", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.referenceSchemaUpdate?.validate(name: "\(name).referenceSchemaUpdate")
            try self.s3ReferenceDataSourceUpdate?.validate(name: "\(name).s3ReferenceDataSourceUpdate")
            try self.validate(self.tableNameUpdate, name: "tableNameUpdate", parent: name, max: 32)
            try self.validate(self.tableNameUpdate, name: "tableNameUpdate", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case referenceId = "ReferenceId"
            case referenceSchemaUpdate = "ReferenceSchemaUpdate"
            case s3ReferenceDataSourceUpdate = "S3ReferenceDataSourceUpdate"
            case tableNameUpdate = "TableNameUpdate"
        }
    }

    public struct S3Configuration: AWSEncodableShape {
        /// ARN of the S3 bucket that contains the data.
        public let bucketARN: String
        /// The name of the object that contains the data.
        public let fileKey: String
        /// IAM ARN of the role used to access the data.
        public let roleARN: String

        public init(bucketARN: String, fileKey: String, roleARN: String) {
            self.bucketARN = bucketARN
            self.fileKey = fileKey
            self.roleARN = roleARN
        }

        public func validate(name: String) throws {
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, max: 2048)
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, min: 1)
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, pattern: "arn:.*")
            try self.validate(self.fileKey, name: "fileKey", parent: name, max: 1024)
            try self.validate(self.fileKey, name: "fileKey", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 2048)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case bucketARN = "BucketARN"
            case fileKey = "FileKey"
            case roleARN = "RoleARN"
        }
    }

    public struct S3ReferenceDataSource: AWSEncodableShape {
        /// Amazon Resource Name (ARN) of the S3 bucket.
        public let bucketARN: String
        /// Object key name containing reference data.
        public let fileKey: String
        /// ARN of the IAM role that the service can assume to read data on your behalf. This role must have permission for the s3:GetObject action on the object and trust policy that allows Amazon Kinesis Analytics service principal to assume this role.
        public let referenceRoleARN: String

        public init(bucketARN: String, fileKey: String, referenceRoleARN: String) {
            self.bucketARN = bucketARN
            self.fileKey = fileKey
            self.referenceRoleARN = referenceRoleARN
        }

        public func validate(name: String) throws {
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, max: 2048)
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, min: 1)
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, pattern: "arn:.*")
            try self.validate(self.fileKey, name: "fileKey", parent: name, max: 1024)
            try self.validate(self.fileKey, name: "fileKey", parent: name, min: 1)
            try self.validate(self.referenceRoleARN, name: "referenceRoleARN", parent: name, max: 2048)
            try self.validate(self.referenceRoleARN, name: "referenceRoleARN", parent: name, min: 1)
            try self.validate(self.referenceRoleARN, name: "referenceRoleARN", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case bucketARN = "BucketARN"
            case fileKey = "FileKey"
            case referenceRoleARN = "ReferenceRoleARN"
        }
    }

    public struct S3ReferenceDataSourceDescription: AWSDecodableShape {
        /// Amazon Resource Name (ARN) of the S3 bucket.
        public let bucketARN: String
        /// Amazon S3 object key name.
        public let fileKey: String
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to read the Amazon S3 object on your behalf to populate the in-application reference table.
        public let referenceRoleARN: String

        public init(bucketARN: String, fileKey: String, referenceRoleARN: String) {
            self.bucketARN = bucketARN
            self.fileKey = fileKey
            self.referenceRoleARN = referenceRoleARN
        }

        private enum CodingKeys: String, CodingKey {
            case bucketARN = "BucketARN"
            case fileKey = "FileKey"
            case referenceRoleARN = "ReferenceRoleARN"
        }
    }

    public struct S3ReferenceDataSourceUpdate: AWSEncodableShape {
        /// Amazon Resource Name (ARN) of the S3 bucket.
        public let bucketARNUpdate: String?
        /// Object key name.
        public let fileKeyUpdate: String?
        /// ARN of the IAM role that Amazon Kinesis Analytics can assume to read the Amazon S3 object and populate the in-application.
        public let referenceRoleARNUpdate: String?

        public init(bucketARNUpdate: String? = nil, fileKeyUpdate: String? = nil, referenceRoleARNUpdate: String? = nil) {
            self.bucketARNUpdate = bucketARNUpdate
            self.fileKeyUpdate = fileKeyUpdate
            self.referenceRoleARNUpdate = referenceRoleARNUpdate
        }

        public func validate(name: String) throws {
            try self.validate(self.bucketARNUpdate, name: "bucketARNUpdate", parent: name, max: 2048)
            try self.validate(self.bucketARNUpdate, name: "bucketARNUpdate", parent: name, min: 1)
            try self.validate(self.bucketARNUpdate, name: "bucketARNUpdate", parent: name, pattern: "arn:.*")
            try self.validate(self.fileKeyUpdate, name: "fileKeyUpdate", parent: name, max: 1024)
            try self.validate(self.fileKeyUpdate, name: "fileKeyUpdate", parent: name, min: 1)
            try self.validate(self.referenceRoleARNUpdate, name: "referenceRoleARNUpdate", parent: name, max: 2048)
            try self.validate(self.referenceRoleARNUpdate, name: "referenceRoleARNUpdate", parent: name, min: 1)
            try self.validate(self.referenceRoleARNUpdate, name: "referenceRoleARNUpdate", parent: name, pattern: "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case bucketARNUpdate = "BucketARNUpdate"
            case fileKeyUpdate = "FileKeyUpdate"
            case referenceRoleARNUpdate = "ReferenceRoleARNUpdate"
        }
    }

    public struct SourceSchema: AWSEncodableShape & AWSDecodableShape {
        /// A list of RecordColumn objects.
        public let recordColumns: [RecordColumn]
        /// Specifies the encoding of the records in the streaming source. For example, UTF-8.
        public let recordEncoding: String?
        /// Specifies the format of the records on the streaming source.
        public let recordFormat: RecordFormat

        public init(recordColumns: [RecordColumn], recordEncoding: String? = nil, recordFormat: RecordFormat) {
            self.recordColumns = recordColumns
            self.recordEncoding = recordEncoding
            self.recordFormat = recordFormat
        }

        public func validate(name: String) throws {
            try self.recordColumns.forEach {
                try $0.validate(name: "\(name).recordColumns[]")
            }
            try self.validate(self.recordColumns, name: "recordColumns", parent: name, max: 1000)
            try self.validate(self.recordColumns, name: "recordColumns", parent: name, min: 1)
            try self.validate(self.recordEncoding, name: "recordEncoding", parent: name, pattern: "UTF-8")
            try self.recordFormat.validate(name: "\(name).recordFormat")
        }

        private enum CodingKeys: String, CodingKey {
            case recordColumns = "RecordColumns"
            case recordEncoding = "RecordEncoding"
            case recordFormat = "RecordFormat"
        }
    }

    public struct StartApplicationRequest: AWSEncodableShape {
        /// Name of the application.
        public let applicationName: String
        /// Identifies the specific input, by ID, that the application starts consuming. Amazon Kinesis Analytics starts reading the streaming source associated with the input. You can also specify where in the streaming source you want Amazon Kinesis Analytics to start reading.
        public let inputConfigurations: [InputConfiguration]

        public init(applicationName: String, inputConfigurations: [InputConfiguration]) {
            self.applicationName = applicationName
            self.inputConfigurations = inputConfigurations
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.inputConfigurations.forEach {
                try $0.validate(name: "\(name).inputConfigurations[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "ApplicationName"
            case inputConfigurations = "InputConfigurations"
        }
    }

    public struct StartApplicationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct StopApplicationRequest: AWSEncodableShape {
        /// Name of the running application to stop.
        public let applicationName: String

        public init(applicationName: String) {
            self.applicationName = applicationName
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "ApplicationName"
        }
    }

    public struct StopApplicationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key of the key-value tag.
        public let key: String
        /// The value of the key-value tag. The value is optional.
        public let value: String?

        public init(key: String, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The ARN of the application to assign the tags.
        public let resourceARN: String
        /// The key-value tags to assign to the application.
        public let tags: [Tag]

        public init(resourceARN: String, tags: [Tag]) {
            self.resourceARN = resourceARN
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 2048)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "arn:aws:kinesisanalytics:[a-z]{2}-[a-z]+-\\d{1}+:\\d{12}+:application/[a-zA-Z0-9_.-]{1,128}")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The ARN of the Kinesis Analytics application from which to remove the tags.
        public let resourceARN: String
        /// A list of keys of tags to remove from the specified application.
        public let tagKeys: [String]

        public init(resourceARN: String, tagKeys: [String]) {
            self.resourceARN = resourceARN
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 2048)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "arn:aws:kinesisanalytics:[a-z]{2}-[a-z]+-\\d{1}+:\\d{12}+:application/[a-zA-Z0-9_.-]{1,128}")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 200)
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateApplicationRequest: AWSEncodableShape {
        /// Name of the Amazon Kinesis Analytics application to update.
        public let applicationName: String
        /// Describes application updates.
        public let applicationUpdate: ApplicationUpdate
        /// The current application version ID. You can use the DescribeApplication operation to get this value.
        public let currentApplicationVersionId: Int64

        public init(applicationName: String, applicationUpdate: ApplicationUpdate, currentApplicationVersionId: Int64) {
            self.applicationName = applicationName
            self.applicationUpdate = applicationUpdate
            self.currentApplicationVersionId = currentApplicationVersionId
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationName, name: "applicationName", parent: name, max: 128)
            try self.validate(self.applicationName, name: "applicationName", parent: name, min: 1)
            try self.validate(self.applicationName, name: "applicationName", parent: name, pattern: "[a-zA-Z0-9_.-]+")
            try self.applicationUpdate.validate(name: "\(name).applicationUpdate")
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, max: 999_999_999)
            try self.validate(self.currentApplicationVersionId, name: "currentApplicationVersionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationName = "ApplicationName"
            case applicationUpdate = "ApplicationUpdate"
            case currentApplicationVersionId = "CurrentApplicationVersionId"
        }
    }

    public struct UpdateApplicationResponse: AWSDecodableShape {
        public init() {}
    }
}
